package com.ruoyi.jwxt.controller;


import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.jwxt.domain.DTO.JwxtLabMaintenanceDTO;
import com.ruoyi.jwxt.domain.DTO.JwxtSchedulingQueryParamsDTO;
import com.ruoyi.jwxt.domain.PO.JwxtLabScheduling;
import com.ruoyi.jwxt.domain.PO.JwxtTeacherApplication;
import com.ruoyi.jwxt.service.IJwxtCourseScheduleService;
import com.ruoyi.jwxt.service.IJwxtLabSchedulingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
@RestController
@RequestMapping("/jwxt/schedule")
public class JwxtCourseScheduleController extends BaseController {
    @Autowired
    private IJwxtCourseScheduleService courseScheduleService;
    @PostMapping("/list")
    public AjaxResult list(@RequestBody JwxtSchedulingQueryParamsDTO params)
    {
        return success(courseScheduleService.select(params));
    }

//    @PreAuthorize("@ss.hasPermi('jwxt:tea_application:export')")
//    @Log(title = "教师实验课申请登记", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, JwxtTeacherApplication jwxtTeacherExperimentApplication)
//    {
//        List<JwxtTeacherApplication> list = jwxtTeacherExperimentApplicationService.select(jwxtTeacherExperimentApplication);
//        ExcelUtil<JwxtTeacherApplication> util = new ExcelUtil<JwxtTeacherApplication>(JwxtTeacherApplication.class);
//        util.exportExcel(response, list, "教师实验课申请登记数据");
//    }
}
